package com.edu.study.base.StuAnswerResultDetail.service.impl;

import com.edu.study.base.StuAnswerResultDetail.domain.StuAnswerResultDetail;
import com.edu.study.base.StuAnswerResultDetail.mapper.StuAnswerResultDetailMapper;
import com.edu.study.base.StuAnswerResultDetail.service.IStuAnswerResultDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 学生答题结果明细Service业务层处理
 * 
 * @author jjt
 * @date 2021-06-20
 */
@Service
//@DataSource(value = DataSourceType.SLAVE)
public class StuAnswerResultDetailServiceImpl implements IStuAnswerResultDetailService 
{
    @Autowired
    private StuAnswerResultDetailMapper stuAnswerResultDetailMapper;

    /**
     * 查询学生答题结果明细
     * 
     * @param id 学生答题结果明细ID
     * @return 学生答题结果明细
     */
    @Override
    public StuAnswerResultDetail selectStuAnswerResultDetailById(Long id)
    {
        return stuAnswerResultDetailMapper.selectStuAnswerResultDetailById(id);
    }

    /**
     * 查询学生答题结果明细列表
     * 
     * @param stuAnswerResultDetail 学生答题结果明细
     * @return 学生答题结果明细
     */
    @Override
    public List<StuAnswerResultDetail> selectStuAnswerResultDetailList(StuAnswerResultDetail stuAnswerResultDetail)
    {
        return stuAnswerResultDetailMapper.selectStuAnswerResultDetailList(stuAnswerResultDetail);
    }

    /**
     * 新增学生答题结果明细
     * 
     * @param stuAnswerResultDetail 学生答题结果明细
     * @return 结果
     */
    @Override
    public int insertStuAnswerResultDetail(StuAnswerResultDetail stuAnswerResultDetail)
    {
        return stuAnswerResultDetailMapper.insertStuAnswerResultDetail(stuAnswerResultDetail);
    }

    /**
     * 修改学生答题结果明细
     * 
     * @param stuAnswerResultDetail 学生答题结果明细
     * @return 结果
     */
    @Override
    public int updateStuAnswerResultDetail(StuAnswerResultDetail stuAnswerResultDetail)
    {
        return stuAnswerResultDetailMapper.updateStuAnswerResultDetail(stuAnswerResultDetail);
    }

    /**
     * 批量删除学生答题结果明细
     * 
     * @param ids 需要删除的学生答题结果明细ID
     * @return 结果
     */
    @Override
    public int deleteStuAnswerResultDetailByIds(Long[] ids)
    {
        return stuAnswerResultDetailMapper.deleteStuAnswerResultDetailByIds(ids);
    }

    /**
     * 删除学生答题结果明细信息
     * 
     * @param id 学生答题结果明细ID
     * @return 结果
     */
    @Override
    public int deleteStuAnswerResultDetailById(Long id)
    {
        return stuAnswerResultDetailMapper.deleteStuAnswerResultDetailById(id);
    }
}
